In general, most video displays and their adapters specify colors of a digital image being displayed according to a Red, Green, and Blue (RGB) scale. Digital images comprise a collection of picture elements or pixels arranged on a regular grid. Digital images can be defined as a gray scale image or a color image. A gray scale image is represented by a channel of specific brightness values at individual pixel locations. A color image pixel is represented by numerical RGB components that correspond to a particular color. These three RGB components are typically three 8-bit numbers for each pixel. Each 8 bit RGB component can have 256 possible values, ranging from 0 to 255 and the composite of the three RGB values creates the final color for that one pixel area. For example, a Black pixel has a RGB value of (0, 0, 0), meaning (Red=0, Green=0, Blue=0), a White pixel has a RGB value of (255, 255, 255), and an Orange pixel has a RGB value of (250, 165, 0). A Gray pixel has the property of having substantially equal values in RGB. For example, a pixel with a RGB value (220, 220, 220) is a light gray (near white), and a pixel with a RGB value (40, 40, 40) is a dark gray (near black). As such, there are approximately 256 shades of gray in a conventional gray-scale display.
The colors of the pixels in an image can also be represented using other values. One example is called “HSV”. Under the HSV model, each color is represented by three values that express the hue, saturation, and value (HSV). The hue is defined as a particular position along a circular hue spectrum in which different colors are represented at different positions along a circle (See FIG. 4). The hue spectrum represents a full range of major hues in the following order: blue, magenta, red, yellow, green, and cyan. The saturation is the distance from gray which corresponds to the center of the circle, (e.g., the amount of the hue present). The value is the brightness of the color and brighter colors have higher values. Gray scale images contain only achromatic colors (i.e., images without a specific hue and with zero saturation).
In order to enhance a user's experience when viewing or using an application user interface (user interface), the user interface may include input controls that allow the user to customize various aspects of the interface's appearance. For example, the user interface may include slide bar controls or other mechanisms that allow the user to adjust hue and/or saturation levels of the user interface. As the user manipulates such controls, the color scheme of user interface is changed by modifying the hue offset and saturation scale of the pixels used to render the user interface. Previously, color adjustment of user interfaces was accomplished by transforming RGB values of pixels in the images into HSV values, adjusting the hue and saturation, and then transforming these adjusted values back to RGB values to generate the resultant image. This technique produces fairly good results when the saturation level is high and the color of the image is preserved. However, as the saturation is lowered and the colors become close to those of a grayscale image, the images lose contrast and appear to become “washed out.” FIG. 1 is a screen shot of an exemplary user interface color-adjusted by conventional HSV to RGB conversion techniques. Images appear washed out because the human eye perceives different colors to have different relative brightness levels. For example, yellow appears brighter than blue even when the colors have the same mathematical brightness when expressed in RGB/HSV colors.
As a result there is a need for an improved system and method for adjusting colors in a digital image.